<div class="portlet">
  <div class="portlet-header">
    <h1><%=t ".title"%></h1>
  </div>
  <div class="portlet-content">
    <% form_tag localusers_path, :method => 'get' do %>      
      <table style="border:0px">
        <tr>
          <th> <%= label_tag t('activerecord.attributes.user.email') %> </th>
          <th> <%= text_field_tag :search_email, params[:search_email] %> </th>
          <th> <%= submit_tag t('btn_search'), :name => nil %> </th>
        </tr>
      </table>
    <% end %>

    <div class="line-label">
      <%= page_entries_info(@localusers) %>
    </div>

    <% if @localusers.size > 0 %>
      <% paginated_section(@localusers, options_will_paginate) do %>
        <table>
          <thead>
            <tr>
              <th><%=t('activerecord.attributes.user.email')%></th>
              <th><%=t('activerecord.attributes.user.roles') %></th>
              <th colspan="3"><%= t('title_actions') %></th>
            </tr>
          </thead>
          <% @localusers.each do |localuser| %>
            <tr>
              <td><%=h localuser.email %></td>
              <td><%= get_roles_descritpion(localuser.roles_mask) %></td>
              <td class="action"><%= link_to t('btn_show'), localuser_path(localuser) %></td>
              <td class="action"><%= link_to t('btn_edit'), edit_localuser_path(localuser) %></td>
              <td class="action"><%= link_to t('btn_destroy'), {:action => 'destroy', :id => localuser}, :confirm => t('msg_sure_destroy?'), :method => :delete %></td>
            </tr>
          <% end %>
        </table>
      <% end %>
    <% end %>

    <div class="line-links">
      <%= link_to t('localusers.index.btn_new_user'), new_localuser_path %>
    </div>
  </div>
  
  <div class="portlet-footer">
  </div>

</div>